<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:81:"D:\lele_project\gitproject\jiaju\public/../application/admin\view\goods\edit.html";i:1758018949;s:75:"D:\lele_project\gitproject\jiaju\application\admin\view\layout\default.html";i:1739775309;s:72:"D:\lele_project\gitproject\jiaju\application\admin\view\common\meta.html";i:1739775309;s:74:"D:\lele_project\gitproject\jiaju\application\admin\view\common\script.html";i:1739775309;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<meta name="referrer" content="never">
<meta name="robots" content="noindex, nofollow">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo htmlentities(\think\Config::get('site.version') ?? ''); ?>" rel="stylesheet">

<?php if(\think\Config::get('fastadmin.adminskin')): ?>
<link href="/assets/css/skins/<?php echo htmlentities(\think\Config::get('fastadmin.adminskin') ?? ''); ?>.css?v=<?php echo htmlentities(\think\Config::get('site.version') ?? ''); ?>" rel="stylesheet">
<?php endif; ?>

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config ?? ''); ?>
    };
</script>

    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav') && \think\Config::get('fastadmin.breadcrumb')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <?php if($auth->check('dashboard')): ?>
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                    <?php endif; ?>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo htmlentities($vo['url'] ?? ''); ?>"><?php echo htmlentities($vo['title'] ?? ''); ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <style>
    .upload-image {
        background: url('/assets/addons/example/img/plus.png') no-repeat center center;
        background-size: 30px 30px;
        height: 30px;
        width: 30px;
        border: 1px solid #ccc;
    }

    textarea.form-control {
        background: #eee;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('One_id'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-one_id" data-rule="required" data-source="typeone/index" class="form-control selectpage"
                name="row[one_id]" type="text" value="<?php echo htmlentities($row['one_id'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Two_id'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-two_id" class="form-control selectpicker" name="row[two_id]" data-rule="required">
                <?php if(isset($twotypetList) && !empty($twotypetList)): foreach($twotypetList as $twotype): ?>
                <option value="<?php echo $twotype['id']; ?>" <?php if($row['two_id']==$twotype['id']): ?>selected<?php endif; ?>><?php echo $twotype['name']; ?></option>
                <?php endforeach; else: ?>
                <option value="0">无</option>
                <?php endif; ?>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Goods_image'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-goods_image" data-rule="required" class="form-control" size="50" name="row[goods_image]"
                    type="text" value="<?php echo htmlentities($row['goods_image'] ?? ''); ?>">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-goods_image" class="btn btn-danger faupload"
                            data-input-id="c-goods_image" data-resize-quality="0.8" data-resize-width="2000"
                            data-resize-height="2000"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-goods_image"><i class="fa fa-upload"></i>
                            <?php echo __('Upload'); ?></button></span>
                    <span><button type="button" id="fachoose-goods_image" class="btn btn-primary fachoose"
                            data-input-id="c-goods_image" data-resize-quality="0.8" data-resize-width="2000"
                            data-resize-height="2000" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> <?php echo __('Choose'); ?></button></span>
                </div>
                <span class="msg-box n-right" for="c-goods_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-goods_image"></ul>
            <div class="tip" style="color: #999;font-size: 12px;margin-top: 5px;">
                <span class="help-block"><?php echo __('产品封面尺寸建议: 336px*274px'); ?></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Goods_images'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-goods_images" data-rule="required" class="form-control" size="50" name="row[goods_images]"
                    type="textarea" value="<?php echo htmlentities($row['goods_images'] ?? ''); ?>">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-goods_images" class="btn btn-danger faupload"
                            data-input-id="c-goods_images" data-resize-quality="0.8" data-resize-width="2000"
                            data-resize-height="2000"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="true" data-preview-id="p-goods_images"><i class="fa fa-upload"></i>
                            <?php echo __('Upload'); ?></button></span>
                    <span><button type="button" id="fachoose-goods_images" class="btn btn-primary fachoose"
                            data-input-id="c-goods_images" data-resize-quality="0.8" data-resize-width="2000"
                            data-resize-height="2000" data-mimetype="image/*" data-multiple="true"><i
                                class="fa fa-list"></i> <?php echo __('Choose'); ?></button></span>
                </div>
                <span class="msg-box n-right" for="c-goods_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-goods_images"></ul>
            <div class="tip" style="color: #999;font-size: 12px;margin-top: 5px;">
                <span class="help-block"><?php echo __('产品图尺寸建议: 750px*750px'); ?></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Name'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text"
                value="<?php echo htmlentities($row['name'] ?? ''); ?>">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Sales'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sales" class="form-control" name="row[sales]" type="text" value="<?php echo htmlentities($row['sales'] ?? ''); ?>">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Brand_id'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand_id" data-rule="required" data-source="brand/index" class="form-control selectpage"
                name="row[brand_id]" type="text" value="<?php echo htmlentities($row['brand_id'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Orgin'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-orgin" class="form-control" name="row[orgin]" type="text" value="<?php echo htmlentities($row['orgin'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Vein'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-vein" class="form-control" name="row[vein]" type="text" value="<?php echo htmlentities($row['vein'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Material'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-material" class="form-control" name="row[material]" type="text"
                value="<?php echo htmlentities($row['material'] ?? ''); ?>">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Size'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-size" class="form-control" name="row[size]" type="text" value="<?php echo htmlentities($row['size'] ?? ''); ?>">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('简介'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-blurb" class="form-control" rows="5" name="row[blurb]" cols="50"
                style="background-color: #ffffff;"><?php echo htmlentities($row['blurb'] ?? ''); ?></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Content'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]"
                cols="50"><?php echo htmlentities($row['content'] ?? ''); ?></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Recommend'); ?>:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
                <?php if(is_array($recommendList) || $recommendList instanceof \think\Collection || $recommendList instanceof \think\Paginator): if( count($recommendList)==0 ) : echo "" ;else: foreach($recommendList as $key=>$vo): ?>
                <option value="<?php echo $key; ?>" <?php if(in_array(($key), is_array($row['recommend'])?$row['recommend']:explode(',',$row['recommend']))): ?>selected<?php endif; ?>><?php echo $vo; ?></option>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </select>

        </div>
    </div>

    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Spec'); ?>:</label>
        <!-- <div class="col-xs-12 col-sm-8">
            <textarea id="c-spec" class="form-control " rows="5" name="row[spec]" cols="50"><?php echo htmlentities($row['spec'] ?? ''); ?></textarea>
        </div> -->
        <div class="col-xs-12 col-sm-8">
            <table class="table fieldlist" data-template="eventtpl" data-name="row[spec]" id="second-table">
                <tr>
                    <td><?php echo __('颜色'); ?></td>
                    <td><?php echo __('色值'); ?></td>
                    <td><?php echo __('图片'); ?></td>
                    <td width="100"></td>
                </tr>
                <tr>
                    <td colspan="4"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i
                                class="fa fa-plus"></i> <?php echo __('Append'); ?></a></td>
                </tr>
            </table>

            <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
            <textarea style="display:none;" name="row[spec]" class="form-control" cols="30"
                rows="5"><?php echo htmlentities($row['spec'] ?? ''); ?></textarea>
            <script id="eventtpl" type="text/html">
                <tr class="form-inline">
                    <td><input type="text" name="<%=name%>[<%=index%>][color_text]" class="form-control" value="<%=row.color_text%>" placeholder="颜色"/></td>
                     <td>
                        <div class="input-group">
                            <input type="text" name="<%=name%>[<%=index%>][color]" class="form-control color-value" value="<%=row.color%>" placeholder="#RRGGBB"/>
                            <span class="input-group-btn" style="position: relative;">
                                <img src="/assets/addons/example/img/color.png" style="width: 15px;height: 15px; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); z-index: 9999;" alt="">
                                <input type="color" class="form-control color-picker" style="padding-left: 30px;" value="<%=row.color ? row.color : '#ffffff'%>"/>
                            </span>
                        </div>
                    </td>
                    <td>
                        <input type="hidden" name="<%=name%>[<%=index%>][image]" id="c-image-<%=index%>" value="<%=row.image%>">
                        <!--@formatter:off-->
                        <button type="button" id="faupload-image" class="btn btn-danger faupload upload-image" data-input-id="c-image-<%=index%>"  data-resize-quality="0.8" 
                            data-resize-width="2000"
                            data-resize-height="2000" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" <%if(row.image){%>style="background-image: url('<%=Fast.api.cdnurl(row.image)%>')"<%}%>></button>
                        <!--@formatter:on-->
                    </td>
                    <td>
                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Status'); ?>:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                <?php if(is_array($statusList) || $statusList instanceof \think\Collection || $statusList instanceof \think\Paginator): if( count($statusList)==0 ) : echo "" ;else: foreach($statusList as $key=>$vo): ?>
                <label for="row[status]-<?php echo $key; ?>"><input id="row[status]-<?php echo $key; ?>" name="row[status]" type="radio"
                        value="<?php echo $key; ?>" <?php if(in_array(($key), is_array($row['status'])?$row['status']:explode(',',$row['status']))): ?>checked<?php endif; ?> /> <?php echo $vo; ?></label>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Weigh'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number"
                value="<?php echo htmlentities($row['weigh'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled"><?php echo __('OK'); ?></button>
        </div>
    </div>
</form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require.min.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version'] ?? ''); ?>"></script>

    </body>
</html>
